using System;
using System.Collections.Generic;
using System.Text;

namespace Christian.Helle.PocketNews.PocketPC.NewsProtocol
{
	public partial class Nntp
	{
		/// <summary>
		/// Represents a method that will handle events associated with the 
		/// Connection operations to the server
		/// </summary>
		public delegate void OnConnectHandler(object sender, string message);
		/// <summary>
		/// Occurs when a connection is established to the news server
		/// </summary>
		public event OnConnectHandler OnConnectSucceed;
		/// <summary>
		/// Occurs when the attempt connection to the news server failed
		/// </summary>
		public event OnConnectHandler OnConnectFailure;
		/// <summary>
		/// Occurs when an attempt to connect to the news server has started
		/// </summary>
		public event OnConnectHandler OnConnectStart;
		/// <summary>
		/// Occurs when the connection is disconnected
		/// </summary>
		public event OnConnectHandler OnDisconnect;
		/// <summary>
		/// Represents method that will handle events associating with the List 
		/// Newsgroup operations
		/// </summary>
		public delegate void OnListNewsgroupHandler(object sender, string newsgroupName);
		/// <summary>
		/// Occurs when a newsgroup name on the connected server is retrieved
		/// </summary>
		public event OnListNewsgroupHandler OnListNewsgroupOne;
		/// <summary>
		/// Occurs when the List Newsgroup operation has started
		/// </summary>
		public event OnListNewsgroupHandler OnListNewsgroupStart;
		/// <summary>
		/// Occurs when the List Newsgroup operation has completed
		/// </summary>
		public event OnListNewsgroupHandler OnListNewsgroupDone;
		/// <summary>
		/// Represents a method that will handle events associated with the Select Group operations
		/// </summary>
		public delegate void OnSelectGroupHandler(object Sender, string message);
		/// <summary>
		/// Occurs when the GROUP command during the SelectGroup operation succeeded
		/// </summary>
		public event OnSelectGroupHandler OnSelectGroupSucceeded;
		/// <summary>
		/// Occurs when the GROUP command during the SelectGroup operation failed
		/// </summary>
		public event OnSelectGroupHandler OnSelectGroupFailed;
		/// <summary>
		/// Represents Methods that will handle events associated with Header download events
		/// </summary>
		public delegate void OnDownloadHeaderDelegate(object Sender, ArticleHeader header);
		/// <summary>
		/// Occurs when one header is retrieved
		/// </summary>
		public event OnDownloadHeaderDelegate OnDownLoadHeaderOne;
		/// <summary>
		/// Occurs when the header retrieval process has failed
		/// </summary>
		public event EventHandler OnDownloadHeaderFailed;
		/// <summary>
		/// Occurs when the header retrieval process has succeeded
		/// </summary>
		public event EventHandler OnDownloadHeaderSucceeded;
		/// <summary>
		/// 
		/// </summary>
		public delegate void OnDownloadArticleLineDelegate(object Sender, string Line);
		/// <summary>
		/// 
		/// </summary>
		public event OnDownloadArticleLineDelegate OnDownloadArticleLineEvent;
	}
}
